from pylab import *
from numpy import *

def PlotPoly():
    """
    PlotPoly produces a nice plot of the polynomials of 1st, 2nd and 3rd order in the range, x = [-4,4].
    There are no input arguments.
    """

    x = r_[-4:4:.1]
    y1 = x
    y2 = x**2
    y3 = x**3

    figure()
    fig = gca()

    fig.plot(x,y1,'-r',linewidth=1.5)
    fig.plot(x,y2,"--b")
    fig.plot(x,y3,'-g')

    fig.axhline(ls="--",color="grey",linewidth=.5)
    fig.axvline(ls="--",color="grey",linewidth=.5)

    fig.axis([-4,4,-10,10])

    fig.legend(("$f(x) = x$","$f(x) = x^2$","$f(x) = x^3$"),loc="lower right")

    xlabel("Value x",fontsize=18)
    ylabel("Function, f(x)",fontsize=18)

    #xlabel("Time [s]",fontsize=18)
    #ylabel("Pressure [bar]",fontsize=18)
